 package cn.gok.config;

 import javax.servlet.ServletContextEvent;
 import javax.servlet.ServletContextListener;
 import javax.servlet.annotation.WebListener;

 /**
 * @author shikundai
 * @date 2021/3/21
 * @time 14:20
 * @description
 */
 @WebListener
public class AppLisener implements ServletContextListener {
     @Override
     public void contextInitialized(ServletContextEvent sce) {
         String path=sce.getServletContext().getContextPath();
         sce.getServletContext().setAttribute("appPath",path);
     }
 }
